﻿#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
	char arr[100] = { 0 };
	gets(arr);
	int i = 0;
	int a = strlen(arr);
	char arr1[30] = { 0 };
	gets(arr1);
	int j = 0;
	int flag = 0;
	int count = 0;
	int b = strlen(arr1);
	for (i = 0; i<a; i++)
	{
		count = 0;
		for (j = i; j<b; j++)
		{
			if (arr[j] == arr[j])
			{
				count++;
			}
			else
				break;
		}
		if (count == b)
			flag++;
	}
	printf("%d", flag);
	return 0;
}